package com.app.service.Information.impl;

import com.app.mapper.Information.CollegeMapper;
import com.app.pojo.College;
import com.app.service.Information.CollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CollegeServiceImpl implements CollegeService {

    @Autowired
    CollegeMapper collegeMapper;

    @Override
    public List<College> getColleges() {
        return collegeMapper.getColleges();
    }

    @Override
    public List<College> getLikeColleges(String college) {
        return collegeMapper.getLikeColleges(college);
    }

    @Override
    public Integer addColleges(String college) {
        return collegeMapper.addColleges(college);
    }

    @Override
    public College getCollege(String college) {
        return collegeMapper.getCollege(college);
    }

    @Override
    public Integer updateCollege(College college) {
        return collegeMapper.updateCollege(college);
    }

    @Override
    public College getCollegeById(Integer id) {
        return collegeMapper.getCollegeById(id);
    }

    @Override
    public Integer delCollege(String college) {
        return collegeMapper.delCollege(college);
    }
}
